<%@ taglib prefix="s" uri="/struts-tags" %>
<%--
  Created by IntelliJ IDEA.
  User: 高金磊
  Date: 2021/4/21
  Time: 20:31
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <title></title>
    <link rel="icon" href="<%=basePath%>favicon.ico" type="image/ico">

    <link href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
    <link href="<%=basePath%>css/fonts.css" rel="stylesheet">
    <link href="<%=basePath%>css/style.css" rel="stylesheet">
</head>
<body>
<button class="btn btn-link" onclick="window.history.back()">返回上一级</button>










   <div class="card">
       <div class="card-body">
           <div class="table-responsive">
               <h3>订单详情</h3>
               <table class="table table-hover">
                   <thead>
                   </thead>
                   <tbody>
                       <tr>
                           <td>订单号</td>
                           <td><s:property value="#request.modify_ob[0].id"/></td>
                       </tr>
                       <%--<tr>--%>
                           <%--<td>用户ID</td>--%>
                           <%--<td><s:property value="#request.modify_ob[0].userId"/></td>--%>
                       <%--</tr>--%>
                       <tr>
                           <td>用户名</td>
                           <td> <s:property value="#request.modify_ob[1].username"/></td>
                       </tr>
                       <%--<tr>--%>
                           <%--<td>书籍ID</td>--%>
                           <%--<td><s:property value="#request.modify_ob[0].bookId"/></td>--%>
                       <%--</tr>--%>

                       <tr>
                           <td>书名</td>
                           <td><s:property value="#request.modify_ob[2].book_name"/></td>
                       </tr>
                       <tr>
                           <td>下单时间</td>
                           <td>
                               <s:property value="#request.modify_ob[0].formatloanTime()"/></td>
                       </tr>
                       <tr>
                           <td>借书天数</td>
                           <td><s:property value="#request.modify_ob[0].day"/></td>
                       </tr>
                       <tr>
                           <td>当前状态</td>
                           <td><s:property value="#request.modify_ob[0].state"/></td>
                       </tr>

                   </tbody>
               </table>

           </div>
           <div style="padding: 25px">
               <form method="get" >
                   <input type="hidden" name="modify_key" value="<s:property value="#request.modify_ob[0].id"/>"/>
                   <button style="margin-left: 20px" class="btn btn-label btn-danger"   type="submit"  value="取消订单" formaction="AltOrder_cancel" >
                       <label class="ftsucai-close-5">
                       </label>
                       取消订单
                   </button>
                   <button style="margin-left: 20px" type="submit" class="btn btn-label btn-primary"  value="借出书籍"  formaction="AltOrder_loan" >
                       <label class="ftsucai-gou-2" >

                       </label>
                       借出书籍
                   </button>
                   <button style="margin-left: 20px" type="submit" class="btn btn-label btn-success"   value="归还书籍" formaction="AltOrder_return" >
                       <label class="ftsucai-log-out">
                       </label>
                       归还书籍
                   </button>
               </form>
           </div>
          <span style="color: red"><s:actionerror/></span>
          <span style="color: #24bb10"><s:actionmessage/></span>

       </div>
   </div>

   <div class="card">
       <div class="card-body">
           <div class="table-responsive">
               <h3>订单日志</h3>
               <table class="table table-hover">
                   <thead>
                   </thead>
                   <tbody>
                   <s:iterator value="#request.orderLogs" var="orderlog">
                       <tr>
                           <td> <s:property value="#orderlog.buildlog()"/><br></td>
                       </tr>

                   </s:iterator>
                   </tbody>
               </table>

           </div>
       </div>
   </div>

   <br>
   <br>
   <br>
   <br>
   <br>
   <br>
   <br>
   <br>



   <script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
   <script type="text/javascript" src="<%=basePath%>js/bootstrap.js"></script>
   <script type="text/javascript" src="<%=basePath%>js/perfect-scrollbar.min.js"></script>
   <script type="text/javascript" src="<%=basePath%>js/main.min.js"></script>
   <script type="text/javascript">
       $(function(){
           $('.search-bar .dropdown-menu a').click(function() {
               var field = $(this).data('field') || '';
               $('#search-field').val(field);
               $('#search-btn').html($(this).text() + ' <span class="caret"></span>');
           });
       });
   </script>
</body>
</html>
